Global Index
HTML5 JS API Index > DOM Tutorials & Specs

HTMLLabelElement

Extends HTMLElement.

The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself.

Properties
HTMLElement?
control
The control IDL attribute must return the label element's labeled control, if any, or null if there isn't one.
HTMLFormElement?
form
Reassociateable form-associated elements have a form IDL attribute, which, on getting, must return the element's form owner, or null if there isn't one.
DOMString
htmlFor
The htmlFor IDL attribute must reflect the for content attribute.